home *** CD-ROM | disk | FTP | other *** search
- #ifndef EGS_EGS_H
- #define EGS_EGS_H
-
- /***************************************************************************\
- * $
- * $ FILE : egs.h
- * $ VERSION : 2
- * $ REVISION : 2
- * $ DATE : 08-Dec-93 12:22
- * $
- * $ Author : mvk
- * $
- *
- * Device Libs
- *
- *
- *****************************************************************************
- * *
- * (c) Copyright 1990/94 VIONA Development *
- * All Rights Reserved *
- * *
- \***************************************************************************/
-
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
- #ifndef EXEC_PORTS_H
- #include <exec/ports.h>
- #endif
- #ifndef EXEC_SEMAPHORES_H
- #include <exec/semaphores.h>
- #endif
- #ifndef UTILITY_TAGITEM_H
- #include <utility/Tagitem.h>
- #endif
-
- /*
- * This library is the basic interface to high resolution graphics boards.
- * The hardware is almost completely encapsulated by this module. It is
- * not allowed to access hardware registers directly.
- *
- * The library is designed for full multitasking support. Thus several
- * programs can use the graphic boards simultaneously. Screens can be
- * switched like Intuition screens by pressing the left Amiga key and "M".
- * See EGS-Input Preferences.
- *
- * Moreover, a separate mouse pointer is supported. The Amiga mouse and
- * EGS mouse can be exchanged by pressing the left Amiga key and "A".
- * If the mouse pointer is on the EGS screen, all key codes are redirected
- * to the screen, too.
- *
- * EGS screens have a message system on their own so that applications with
- * input processing can lack any window without losing multitasking
- * capabilities.
- */
-
- /****** EGS - Memory ********************************************************/
-
- /*
- * EMemNode, EMemPtr
- * EGS implements an own memory management system that is optimized for large
- * consecutive pieces of memory which are requiered for display driver
- * needs. These memory system is intended to be used by display driver
- * implementors to make optimal use of ther video memory.
- *
- * Graphics memory on the boards is allocated by the procedure AllocEMem.
- * The memory segments are held in EMemNode list structures. As graphic
- * boards use almost only big consecutive segments, the EGS libraries incorporates
- * memory management routines that can move memory in its address location. To
- * inhibit memory running away while being used, the EMemNode must be locked
- * by incrementing "lock", e.g. when loading "dest" into any address register.
- * "lock" must be decremented after memory access. The address of the
- * allocated graphics memory is located in the "dest" field.
- * Only the fields "dest" and "lock" are public, all other fields are
- * strictly private. Example:
- *
- * EMemNode mem;
- * ...
- * mem.lock++; now mem.dest may be used
- * *mem.dest = $AA;
- * ...(further memory accesses)...
- * mem.lock--; now mem.dest may not be used any longer
- */
-
- /*
-
- To access the "lock" component, you would have to use
- "mynode.lock.false.lock", which is simply disgusting !
-
- struct E_EMemNode {
- APTR Dest;
- union {
- struct {
- BYTE Lock;
- UBYTE Display;
- } false;
- struct {
- UWORD Moveable;
- } true;
- } Lock;
-
- UWORD Pad_1;
- LONG Size;
- APTR Next, Prev;
-
- };
-
- But as "moveable" is private to the EGS library, I just ignore the
- memory variation. If you want to test for moveability then test both
- "lock" and "display".
-
- */
-
- typedef struct E_EMemNode *E_EMemPtr;
-
- struct E_EMemNode {
- APTR Dest;
- BYTE Lock;
- UBYTE Display;
- UWORD Pad_1;
- LONG Size;
- E_EMemPtr Next, Prev;
- APTR MemDest;
- LONG MemDisp;
- };
-
- /*
- * An EMemPool is an opaque structure that controls the allocation of
- * video memory. It is allocated by library calls, and must be passed to
- * the appropriate allocation functions to allocate memory on a
- * graphics board.
- */
-
- typedef VOID *E_EMemPoolPtr;
-
-
- /****** EGS - Objects ********************************************************/
-
-
- /*
- * An E_Symbol is an opaque 4 byte unique descriptor of a string. It a value
- * in which is the unique for every process that uses the EGS system. It is
- * internal composed out of a hash value and an unique identifier part, so it's
- * a optimal suited to be used in dictionaries.
- */
-
- typedef VOID *E_Symbol;
-
- /*
- * The E_EGSObject is the base object type of the EGS object system. It is
- * empty, that it can be used as predecessors to any existing structure.
- * The ISA pointer (the pointer to the objects class) is located at offset
- * minus four, so that creation and destrcution of objects may only be done
- * by library calls or message sends to their class.
- * This structure should have been the prefix of all EGS objects, but as
- * our C compiler refuses to operate with empty structs, it appears only
- * as a comment.
- */
-
- typedef VOID E_EGSObject;
-
- typedef E_EGSObject *E_EGSObjectPtr;
-
- struct E_PublicEGSObject {
- /* E_EGSObject */
- LONG UseCount;
- struct SignalSemaphore Lock;
- WORD Pad0;
- E_Symbol Name;
- };
-
- typedef struct E_PublicEGSObject *E_PublicEGSObjectPtr;
-
-
- /*
- * The E_EGSObjMsg is a header of all messages in the EGS object system.
- * The fields "Self" and "Method" are filled if the message is dispatched by
- * using E_Dispatch. For shortcut invocation, the fields have to be filled
- * by the calling routine.
- * Every extended message needs this part as a prefix.
- */
-
- struct E_EGSObjMsg {
- E_EGSObjectPtr Self; /* Receiver */
- E_Symbol Method; /* Method identifier */
- };
-
- typedef struct E_EGSObjMsg *E_EGSObjMsgPtr;
-
- /*
- * The calling conventiosn for an E_EGSCall are
- * A2 the message
- * A1 the contents of the associated data field
- * All registers except A4 are scratch.
- */
-
- typedef void (*E_EGSCall)();
-
- /*
- * should be:
- *
- * typedef void __asm (*E_EGSCall)(register __a1 APTR, register __a2 E_EGSObjMsgPtr);
- */
-
- struct E_EGSMethod {
- APTR Data; /* Method implementor specific */
- E_EGSCall Call; /* The method itself */
- };
-
- typedef struct EGSMethod *E_EGSMethodPtr;
-
- /*
- * An EGS class contains the class specific information of all EGS objects
- * of this class. All classes have their own class, called a metaclass.
- * Classes are created by library calls or by messages to their
- * metaclass. The metaclass contains the methods for adding new methods
- * or creating a subclass. The class of metaclasses is always classclass.
- *
- * Classes can be public or private. Public classes can be used by every
- * user of the EGS system. Bitmap types are an example for public classes.
- * Public classes are loaded and initialized on a request if they are not
- * in the system. Alternatively they can be created by user programs
- * and then their can be made public.
- */
-
- typedef struct E_EGSClass *E_EGSClassPtr;
-
- struct E_EGSClass {
- struct E_PublicEGSObject Object; /* All EGS classes are
- * also objects.
- */
- LONG ObjectSize; /* The size of an instance */
- E_EGSClassPtr Super; /* The superclass */
- struct E_EGSMethod Create, /* private shortcuts */
- Delete,
- AddMethod;
- };
-
- /*
- * This is the basic type of a "creation" message. It is sent to a class to
- * create new object of this class. If the creation fails, the result should
- * be NULL. This message is also sent by a call to E_CreateObject.
- */
-
- #define E_CreateName "create"
-
- struct E_CreateMsg {
- struct E_EGSObjMsg ObjMsg; /* Message header */
- APTR Obj; /* The resulting object */
- };
-
- typedef struct E_CreateMsg *E_CreateMsgPtr;
-
- /*
- * This is the message type of a "deletion" message. The object itself will
- * be deleted. This message is also sent by a call to E_DeleteObject.
- */
-
- #define E_DeleteName "delete"
-
- struct E_DeleteMsg {
- struct E_EGSObjMsg ObjMsg; /* Message header */
- };
-
- typedef struct DeleteMsg *DeleteMsgPtr;
-
- /*
- * This is the message to be used to add a method to an existing class.
- * It will eventually replace an already existing method. Subclasses will
- * only be affected, if they had no message of the new type before.
- * This message is also sent by E_AddMethod.
- */
-
- #define E_AddMethodName "addMethod"
-
- struct E_AddMethodMsg {
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_Symbol Name; /* The Method name */
- E_EGSCall Call; /* The routine */
- APTR Data; /* Implementor data */
- };
-
- typedef struct E_AddMethodMsg *E_AddMethodMsgPtr;
-
- /*
- * Array item for class bulk initialization.
- */
-
- struct E_MethodList {
- char *Name;
- E_EGSCall Call;
- };
-
- typedef struct E_MethodList *E_MethodListPtr;
-
- /*
- * Message type for requesting a class to create a subclass of itself.
- */
-
- #define E_CreateSubClassName "createSubClass"
-
- struct E_CreateSubClassMsg {
- struct E_EGSObjMsg ObjMsg; /* Message header */
- LONG ObjectSize, /* The size of an instance
- * of the new class
- */
- ClassSize; /* The size of the class
- * container of the new
- * class.
- */
- E_EGSClassPtr Class; /* Results the new classs,
- * if successful, NULL
- * else
- */
- };
-
-
- typedef struct CreateSubClassMsg *E_CreateSubClassMsgPtr;
-
-
- /*
- * The name of the rootclass of all classes. The class itself maybe
- * obtained by using E_GetSymbol and E_ObtainPublicClass.
- */
-
- #define E_ObjectClassName "Object.class"
- #define E_PubObjectClassName "PubObject.class"
-
- /*
- * The baseclass of all classes, and also the class of all
- * metaclasses.
- */
-
- #define E_ClassClassName "Class.class"
-
-
- /******** EGS - Colors *******************************************************/
- /*
- * CLUEntry, CLU, CLUPtr
- *
- * The color lookup table. The range of a color component (red, green or
- * blue) is 0 to 255, which means all 8 bits are used. The number of necessary
- * table entries depends on the selected screen depth. If the CLUT is too
- * short, the missing colors are selected by random. If no CLUT is
- * specified for a screen, a standard CLUT is generated.
- */
-
- struct E_CLUEntry {
- UBYTE Red,
- Green,
- Blue,
- Alpha;
- };
-
- typedef struct E_CLUEntry E_CLU;
- typedef E_CLU *E_CLUPtr;
-
- /******** EGS - Input *******************************************************/
- /*
- * EDCMPFlags, EDCMPFlagSet, EGSMsgPtr, EGSMessage
- *
- * Structures for the message system working on the EScreen level. Thus
- * mouse and character input can be gained without opening a window.
- *
- * EDCMPFlags:
- * eMOUSEBUTTONS : Mouse buttons were pressed
- * eMOUSEMOVE : Mouse was moved
- * eRAWKEY : Key code from the keyboard
- * eINTUITICK : Timer is calling
- * eDISKINSERTED : Disk was inserted
- * eDISKREMOVED : Disk was removed
- * eNEWPREFS : Preferences have been changed
- * eLEAVEVERIFY : The pointer requests to leave your screen
- * has to be replied with okOk or okCancel in order
- * to permit or forbid the migration.
- * eENTERSCREEN : The pointer just entered your screen
- *
- * .Class : Type of the message
- * .Code : Message code (refer to "InputEvents")
- * .Qualifier : Message code (refer to "InputEvents")
- * .IAddress : (For E_eRAWKEY: Pointer to deadkey array )
- * .MouseX,
- * .MouseY : Mouse position
- * .Second,
- * .Micros : Event time
- * .EdcmpScreen : Screen sending the message
- * .Tablet : Tabletdata
- */
-
- /* Corresponding EDCMPFlagSet has 32 bits ! */
-
- #define E_eMOUSEBUTTONS 0x00000001
- #define E_eMOUSEMOVE 0x00000002
- #define E_eRAWKEY 0x00000004
- #define E_eTIMETICK 0x00000008
- #define E_eDISKINSERTED 0x00000010
- #define E_eDISKREMOVED 0x00000020
- #define E_eNEWPREFS 0x00000040
- #define E_eLEAVEVERIFY 0x00000080
- #define E_eENTERSCREEN 0x00000100
-
- #define E_TABLETA_Dummy (TAG_USER + 0x3A000)
- #define E_TABLETA_TabletZ (E_TABLETA_Dummy + 0x01)
- #define E_TABLETA_RangeZ (E_TABLETA_Dummy + 0x02)
- #define E_TABLETA_AngleX (E_TABLETA_Dummy + 0x03)
- #define E_TABLETA_AngleY (E_TABLETA_Dummy + 0x04)
- #define E_TABLETA_AngleZ (E_TABLETA_Dummy + 0x05)
- #define E_TABLETA_Pressure (E_TABLETA_Dummy + 0x06)
- #define E_TABLETA_ButtonBits (E_TABLETA_Dummy + 0x07)
- #define E_TABLETA_InProximity (E_TABLETA_Dummy + 0x08)
-
- struct E_TabletData {
- UWORD XFraction, YFraction; /* Tablet sub pixel
- * coordinates
- */
- ULONG TabletX, TabletY; /* Absolute corrdinates on
- * the tablet
- */
- ULONG RangeX, RangeY; /* The tablet's coordinate
- * range.
- */
- struct TagItem *TagList; /* Extended tablet data
- * as supplied by the tablet
- * driver.
- */
- };
- typedef struct E_TabletData *E_TabletDataPtr;
-
- typedef struct E_EScreen *E_EScreenPtr; /* see struct E_EScreen at
- * the bottom
- */
-
- struct E_EGSMessage {
- struct Message Msg; /* has long word size */
- ULONG Class; /* The type of the message */
- UWORD Code; /* key code or else */
- UWORD Qualifier; /* qualifiers */
- APTR IAddress; /* extended information */
- WORD MouseX, MouseY; /* current pointer location*/
- ULONG Seconds, Micros;/* current time */
- E_EScreenPtr E_edcmpScreen; /* messaging screen */
- LONG DoubleDead;
- struct E_TabletData Tablet;
- /* extended tablet data,
- * check for NULL */
- };
-
- typedef struct E_EGSMessage *E_EGSMsgPtr;
-
-
- /******** EGS - BitMap *******************************************************/
-
- /*
- * E_Pattern, array for monochrome or bichromatic pattern fills
- */
-
- typedef WORD E_Pattern[16];
- typedef E_Pattern *E_PatternPtr;
-
- typedef ULONG E_ColorTable;
- typedef E_ColorTable *E_ColorTablePtr;
-
- struct E_Image {
- WORD Width,
- Height,
- Depth,
- Pad;
- APTR Planes[8];
- };
-
- typedef struct E_Image *E_ImagePtr;
-
- /*
- * MinTerms for blit operations on pseudo color screens.
- */
-
- #define E_nSRC_nDST 0x00000001
- #define E_nSRC_DST 0x00000002
- #define E_SRC_nDST 0x00000004
- #define E_SRC_DST 0x00000008
-
- /*
- ** For Bitmap OR BitMap set (E_nSRC_DST | E_SRC_nDST | E_SRC_DST)
- */
-
- /*
- * EBitMapPtr, EBitMap
- *
- * Basic structure for management of graphics memory.
- *
- * As different graphic boards exist which have different memory organisations
- * the egs libraries offer several different bitmap types.
- *
- * These are the fields that have the same meaning in any bitmap:
- *
- * .Width : Pixel Width.
- * .Height : Pixel Height.
- * .BytesPerRow : Number of bytes per row.
- * .Depth : Number of bits for one pixel; though in 24 bit mode (real)
- * the number 24 is contained herein, always 32 bits
- * (one longword)
- *
- * .Type : Type ot the Bitmap. Currently these types exist:
- *
- * E_PIXELMAP : The memory format is chunky which means that the bits that
- * build up one pixel lay in adjacent memory locations.
- * E.g. 2 bits : aabbccdd eeffgghh iijjkkll ...
- * The organisation in 24 bit is RGBx. This is the native EGS
- * bitmap type. You can always get a map of this type in
- * 24 bits. The functions in EGSblit are always able to work
- * with this bitmap and convert from and to other 24 bit
- * formats, or to other bit depths.
- * The real location in memory is
- *
- * ..->Typekey.PixelMap.Planes.Dest
- *
- * or
- *
- * ..->Plane
- *
- * The memory has to be locked before it is accessed or the
- * pointer to it is used, as the libraries are able to move
- * parts of the graphics memory to gain longer fragments.
- * To lock increment the lock field; to unlock, decrement it
- * again. This lock does not guarantee exclusive access; it
- * only guarantees, that the bitmap ist not moved.
- *
- * E_PIXLACEMAP : Some graphic boards have in interlaced a splitted memory
- * which means that the odd and the even field of the display
- * reside in different memory locations. The format is the
- * same as E_PIXELMAP, with one exception. The even lines
- * are in one block and the odd lines are in one block. The
- * starting location of the odd field is
- *
- * ..->Typekey.PixelMap.Planes.Dest+
- * ..->Typekey.PixelMap.IntDisp
- *
- * E_BITPLANEMAP : The bits that build each pixel are spread over several
- * bitplanes.
- *
- * E_USERMAP : Nothing is known about the structure of the frame store.
- *
- * E_PIXELMAP_xRGB : Same as E_PIXELMAP, except that the format in 24 bit is
- * xRGB and not RGBx.
- * E_LOCKED_... : Same as their pendants, except that they require a
- * lock and unlock arbitration through a message call.
- * E_SELECT_B... : The plane to work on has to be selected by a message
- * call, and than appears in ..Plane1. Locking and
- * unlocking has to be done like in E_LOCKED_...
- *
- * Your programms should be able to handle at least the E_PIXELMAP 24 format.
- * If it can't handle the format it is given, use the routines of the
- * EGSblit.library or the direct method calls.
- * If you need a bitmap for double buffering you should use the bitmap from
- * your screen as friend bitmap and the flag E_EB_DISPLAYABLE.
- *
- * All fields in the bitmap structure (except of .Lock) are read only. It is
- * highly discouraged, to modify any fields. If you need a bitmap for an
- * existing block of memory, you may call E_AllocBitMapFrame to allocate
- * and initialize an empty bitmap frame. You may then put your own bitmap
- * pointer into the appropriate fields. You may not delete such a bitmap
- * using E_DisposeBitMap, instead you have to call E_DisposeBitMapFrame, and
- * free your image memory on your own account.
- *
- * For reasons of compatibility with existing applications and easyness of use
- * there are two restricted tasks that may be performed by an application
- * created bitmap.
- *
- * 1. An application created 24 bit E_PIXELMAP may be copied to any
- * EGS bitmap using EB_CopyBitMap or EG_CopyBitMapRastPort.
- *
- * 2. An application created 1 bit E_PIXELMAP may be used as a mask in
- * mask related operations like EB_FillMask, EG_FillMask or
- * EG_FillMaskSeg
- *
- * You may not perform any other type of blit operation on your application
- * created bitmap. You have to initialize the fields .Width, .Height, .Depth,
- * .Type, .Plane. and .bytesPerRow.
- *
- */
-
- /*
- * Standard bitmap types. All other bitmaps are customer defined.
- */
-
- #define E_PIXELMAP 0
- #define E_PIXLACEMAP 1
- #define E_BITPLANEMAP 2
- #define E_USERMAP 3
- #define E_PIXELMAP_xRGB 4
- #define E_LOCKED_PIXELMAP 5
- #define E_LOCKED_BITPLANEMAP 6
- #define E_SWAPED_PIXELMAP 7
- #define E_LOCKED_SWAPED_PIXELMAP 8
- #define E_PACKED_PIXELMAP 9
- #define E_LOCKED_PACKED_PIXELMAP 10
- #define E_SELECT_BITPLANEMAP 11
- #define E_LOCKED_PIXLACEMAP 12
- #define E_LOCKED_PIXELMAP_xRGB 13
- #define E_SEGMENT_PIXELMAP 14
- #define E_SEGMENT_PACKED_PIXELMAP 15
- #define E_SWAPED_PACKED_PIXELMAP 16
- #define E_SEG_SWAPED_PACKED_PIXELMAP 17
- #define E_UNKNOWNMAP 18
-
- /*
- * E_EBitMap Flags
- */
-
- #define E_EB_DISPLAYABLE 0x00000001 /* This bitmap is intended to be
- * displayed. This will place
- * some restriction on the
- * bitmap (eg. its size).
- * This flag is only usefull,
- * if used together with a friend
- * bitmap
- */
-
- #define E_EB_BLITABLE 0x00000002 /* This bitmap should be placed in
- * such memory that it easily can
- * be blitted to and from its
- * friend bitmap
- */
- #define E_EB_SWAPABLE 0x00000004
- #define E_EB_NOTSWAPABLE 0x00000008
- #define E_EB_CLEARMAP 0x00000010 /* The bitmap is to be cleared after
- * allocation
- */
-
- typedef struct E_EBitMap *E_EBitMapPtr;
-
- typedef struct E_EBitMapClass *E_EBitMapClassPtr;
-
-
- /*
- * original version,
- */
- struct E_EBitMapFull {
-
- /* struct E_EGSObject ObjMsg; */
- WORD Width, Height,
- BytesPerRow;
- BYTE Depth;
- UBYTE Type;
-
- /* Enumeration type descriptor for access to union fields */
-
- union {
-
- struct {
- struct E_EMemNode Planes;
- ULONG IntDisp;
- } PixelMap;
-
- struct {
-
- APTR BitPlane0;
- BYTE Lock;
- UBYTE Display;
- UWORD Pad0;
- ULONG Pad1;
- APTR BitPlanes[24];
- } BitPlaneMap;
-
- struct {
- APTR Action;
- } UserMap;
-
- } Typekey;
-
- E_CLUPtr Colors;
- ULONG Flags; /* E_EBitMapFlagSet */
- E_EBitMapClassPtr Class;
- };
-
- /*
- * simplified, as c has its problems with union types.
- */
-
- struct E_EBitMap {
- /* struct E_EGSObject Object; */
- WORD Width, Height; /* bitmap dimensions in units
- * of pixel
- */
- UWORD BytesPerRow; /* bytes in one row of the
- * bitmap, this may differ for
- * different bitmap types,
- * especially for displayable
- * maps. So it's unwise to make
- * any assumptions about
- * relations between Width/
- * Depth and BytesPerRow.
- */
- BYTE Depth; /* number of bits for one
- * pixel in the bitmap.
- */
- UBYTE Type; /* public or private type of
- * the bitmap. If you check
- * this, and obey the bitmaps
- * rules, you may access some
- * bitmap types directly
- */
- APTR Plane; /* In chunky map types like
- * E_PIXELMAP, this is the
- * address of the first pixel
- * in memory. In plane
- * oriented bitmaps this is
- * a clone of the pointer to
- * the first plane. Therefore
- * single bit chunky can be
- * used the same way as
- * single bit plane.
- */
- BYTE Lock; /* Lockvalue in bitmaps with
- * simple locking schemes.
- */
- UBYTE Display;
- UWORD Pad0;
- ULONG Pad1;
- APTR BitPlanes[24]; /* In bitplane oriented maps
- * this is where the
- * addresses of the planes
- * are stored
- */
- E_CLUPtr Colors; /* If the bitmap has an own
- * or shared colormap, it
- * will be found here, or
- * NULL else. If a bitmap is
- * allocated using a friend,
- * it will share its friend's
- * colormap.
- */
- ULONG Flags; /* See E_EB_.. */
- E_EBitMapClassPtr Class; /* A copy of the bitmaps class
- * for simplified access
- */
- };
-
- /* Access example:
- *
- * E_EBitMapPtr Ptr;
- * APTR Plane, Otherplane;
- *
- * if (Ptr->Type == E_BITPLANEMAP)
- * {
- * Plane = Ptr->BitPlanes[someindex];
- * }
- * if (Ptr-Type == E_PIXELMAP)
- * {
- * Otherplane = Ptr->Plane;
- * }
- *
- */
-
-
- /*
- * Message to be used for single pixel operations like "ReadPixel" or
- * "WritePixel".
- */
-
- struct E_PixelMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* The affected map */
- LONG Color;
- /* The color to be used, or
- * returned. May be either
- * the pixel value or an
- * 24 bit color value. On calls
- * to "ReadPixel24" this is
- * guaranted to return the
- * 'real' color
- */
-
- WORD X,Y; /* Coordinates in pixels */
- };
-
- typedef struct E_PixelMsg *E_PixelMsgPtr;
-
- /*
- * Message for line drawing operations. It is not likely to be used,
- * instead you should make calls to the drawing operation of EGSblit.
- */
-
- struct E_DrawMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* The affected map */
- LONG Front, /* foreground pen or -1 for
- * complement
- */
- Back; /* Background pen or -1 for
- * monochrome lines
- */
- UWORD Patt; /* line pattern */
- WORD X1,Y1; /* starting coordinate */
- WORD X2,Y2; /* ending coordinate */
- WORD Dx,Dy; /* extended delta */
- WORD Sum; /* start sum for Bresenham */
- };
-
- typedef struct E_DrawMsg *E_DrawMsgPtr;
-
- /*
- * Message for copying and conversion from rectangular areas
- */
-
- struct E_CopyBitMapMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Src; /* source bitmap */
- E_EBitMapPtr Dst; /* destination bitmap */
- WORD Sx,Sy; /* top left coordinate in the
- * source bitmap
- */
- WORD W,H; /* width and height of the
- * rectangular area
- */
- WORD Dx,Dy; /* top left coordinate in the
- * destination bitmap
- */
- };
-
- typedef struct E_CopyBitMapMsg *E_CopyBitMapMsgPtr;
-
- /*
- * Message for rectangular and masked fill operations
- */
-
- struct E_RectFillMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* destination bitmap */
- E_EBitMapPtr Mask; /* optional single pixel mask
- * bitmap, must be either of
- * type E_PIXELMAP or
- * E_BITPLANEMAP.
- */
- E_EBitMapPtr MPatt; /* multicolor pattern, should be
- * a friend bitmap of the
- * destination bitmap
- */
- E_PatternPtr Patt; /* mono- or bichromatic fill-
- * pattern
- */
- LONG Front, /* foreground pen, or -1
- * for complement mode
- */
- Back; /* background pen, or -1 for
- * transparent monochromatic
- * pattern
- */
- WORD Sx,Sy; /* top left coordinates in the
- * mask
- */
- WORD W,H; /* width and height of the
- * rectangle to be filled
- */
- WORD Dx,Dy; /* top left coordinates in the
- * destination bitmap
- */
- WORD Ox,Oy; /* top left offset of the
- * multicolor pattern
- */
- };
-
- typedef struct E_RectFillMsg *E_RectFillMsgPtr;
-
- /*
- * Message for unpacking from packed bitplane images
- */
-
- struct E_UnpackMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* destination bitmap */
- E_ImagePtr Image; /* the image to be unpacked */
- E_ColorTablePtr Colors; /* image colors */
- };
-
- typedef struct E_UnpackMsg *E_UnpackMsgPtr;
-
-
- /*
- * Message for extracting a single color of a bitmap
- */
-
- struct E_ExtractColorMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Src; /* source bitmap */
- E_EBitMapPtr Dst; /* single bit destination map;
- * May be either of type
- * E_PIXELMAP or E_BITPLANEMAP.
- */
- LONG Color; /* the color to be extracted */
- WORD Sx,Sy; /* top left coordinates in the
- * source bitmap
- */
- WORD W,H; /* width and height of the
- * rectangle to be affected
- */
- WORD Dx,Dy; /* top left coordinates in
- * the destination map
- */
- };
-
- typedef struct E_ExtractColorMsg *E_ExtractColorMsgPtr;
-
- /*
- * Message for bitmap clearing
- */
-
- struct E_ClearMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* the affected map */
- };
-
- typedef struct E_ClearMsg *E_ClearMsgPtr;
-
- /*
- * Message to access a line of memory in segmented bitmaps
- */
-
- struct E_SelectLinePtrMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* the used map */
- WORD Line,Pad0; /* the number of the requested
- * line, zero for topline
- */
- APTR Ptr; /* resulting pointer to line */
- };
-
- typedef struct E_SelectLinePtrMsg *E_SelectLinePtrMsgPtr;
-
- /*
- * Message for locking and unlocking of bitmaps
- */
-
- struct E_LockMapMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* the used map */
- };
-
- typedef struct E_LockMapMsg *E_LockMapMsgPtr;
-
- /*
- * Messgae for bitmap allocation
- */
-
- struct E_AllocBitMapMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* the resulting map, of NULL
- * if failed.
- */
- E_EBitMapClassPtr Class; /* the class of the requested
- * bitmap
- */
- WORD W,H; /* requested size of the
- * bitmap
- */
- ULONG Flags; /* flags for the requested
- * bitmap E_EB_...
- */
- };
-
- typedef struct E_AllocBitMapMsg *E_AllocBitMapMsgPtr;
-
- /*
- * Message for bitmap deletion
- */
-
- struct E_DisposeBitMapMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* the used map */
- };
-
- typedef struct E_DisposeBitMapMsg *E_DisposeBitMapMsgPtr;
-
- /*
- * Message for amiga compatible blits, from EGS bitmap to EGS bitmap.
- */
-
- struct E_BitBltMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Src; /* source bitmap */
- E_EBitMapPtr Dst; /* destination bitmap */
- WORD Sx,Sy; /* top left of source */
- WORD W,H; /* dimension */
- WORD Dx,Dy; /* top left of destination */
- UBYTE Terms; /* blit minterms */
- UBYTE Mask; /* 'planes' to be affected */
- WORD Pad0;
- };
-
- typedef struct E_BitBltMsg *E_BitBltMsgPtr;
-
- /*
- * Mesage for amiga compatible blits, from/to EGS bitmap and bitplanes
- */
-
- struct E_BitBltPlaneMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* the EGS bitmap in the blit */
- WORD Depth; /* number of bitplanes */
- APTR Planes[8]; /* the planes themself */
- WORD BytesPerRow; /* bytes per row in planes */
- WORD Sx,Sy; /* top left of source */
- WORD W,H; /* dimensions */
- WORD Dx,Dy; /* top left of destination */
- UBYTE Terms; /* blit minterms */
- UBYTE Mask; /* 'planes' to be affected */
- WORD Pad0;
- };
-
- typedef struct E_BitBltPlaneMsg *E_BitBltPlaneMsgPtr;
-
- /*
- * Message for selecting of a bitplane in select bitmaps
- */
-
- struct E_SelectPlaneMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* the map itself */
- WORD Plane; /* which plane to be selected */
- WORD Pad0;
- };
-
- typedef struct SelectPlaneMsg *E_SelectPlaneMsgPtr;
-
- /*
- * Messages for Zooming
- */
-
- struct E_ZoomBitMapMsg {
-
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Src; /* source bitmap */
- E_EBitMapPtr Dst; /* destination bitmap */
- WORD Sx,Sy; /* top left coordinate in the
- * source bitmap
- */
- WORD W,H; /* width and height of the
- * rectangular area
- */
- WORD Dx,Dy; /* top left coordinate in the
- * destination bitmap
- */
- WORD Zoom;
- };
-
- typedef struct E_ZoomBitMapMsg *E_ZoomBitMapMsgPtr;
-
- struct E_ZoomMaskMapMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr Map; /* destination bitmap */
- E_EBitMapPtr Mask; /* optional single pixel mask
- * bitmap, must be either of
- * type E_PIXELMAP or
- * E_BITPLANEMAP.
- */
- E_EBitMapPtr MPatt; /* multicolor pattern, should be
- * a friend bitmap of the
- * destination bitmap
- */
- E_PatternPtr Patt; /* mono- or bichromatic fill-
- * pattern
- */
- LONG Front, /* foreground pen, or -1 for
- * for complement mode
- */
- Back; /* background pen, or -1 for
- * transparent monochromatic
- * pattern
- */
- WORD Sx,Sy; /* top left coordinates in the
- * mask
- */
- WORD W,H; /* width and height of the
- * rectangle to be filled
- */
- WORD Dx,Dy; /* top left coordinates in the
- * destination bitmap
- */
- WORD Ox,Oy; /* top left offset of the
- * multicolor pattern
- */
- WORD Zoom; /* Zoomfactor */
- };
-
-
- /*
- * The basic class container for all EGS bitmaps. This structure is absolutely
- * read only, except for bitmap class implementors.
- *
- */
-
- struct E_EBitMapClass {
-
- struct E_EGSClass E_EGSClass; /* class header */
- UBYTE Type; /* bitmap type */
- BYTE Depth; /* bitmap depth */
- WORD Pad0;
- E_CLUPtr DitherCLU; /* pointer for the
- * initial clut, to
- * achieve perfect
- * dithering. NULL for
- * true color bitmaps,
- * that do not need
- * dithering.
- */
- WORD DitherNum; /* number of pens, used
- * for dithering.
- */
- UBYTE FirstFree; /* first free pen in the
- * colormap
- */
- UBYTE NumFree; /* number of free pens
- * in the colormap
- */
- struct E_EGSMethod /* shortcut calls for
- * blit methods.
- */
- ReadPixel,
- ReadPixel24,
- WritePixel,
- Draw,
- CopyBitMap,
- ConvertTo24,
- ConvertFrom24,
- ConvertBitMap,
- RectFill,
- RectFillPatt,
- RectFillMPatt,
- FillMask,
- FillMaskBack,
- FillMaskPatt,
- FillMaskMPatt,
- Unpack,
- ExtractColor,
- Clear,
- AllocBitMap,
- DisposeBitMap,
- SelectLine,
- ObtainMap,
- ReleaseMap,
- BitBlt,
- BitBltFromPlanes,
- BitBltToPlanes,
- SelectPlane,
- SwapBitMap,
- ZoomBitMap,
- ZoomFrom24,
- ZoomMaskMap;
- };
-
- /*
- * Read a pixel in a bitmap. The result is bitmap dependant, and may be
- * either a 24 bit value or a pen number.
- */
- #define E_ReadPixelName "readPixel"
-
- /*
- * Read a true color pixel in a bitmap. The result will be a 24 bit color
- * value. This call will fail and return -1, if the color can not be
- * retrieved.
- */
- #define E_ReadPixel24Name "readPixel24"
-
- /*
- * Write a single pixel into a bitmap. The used pen may either be a
- * pen value or a 24 bit color value in the three MSBs. The value -1
- * is used for complement mode.
- */
- #define E_WritePixelName "writePixel"
-
- /*
- * Draw a line using Bresenham's algorithm. You should better use the
- * calls in EGSblit.
- */
- #define E_DrawName "draw"
-
- /*
- * Copy rectangle between two bitmaps of exactly same type and depth.
- */
- #define E_CopyBitMapName "copyBitMap"
-
- /*
- * Convert from any bitmap to a 24 bit E_PIXELMAP bitmap
- */
- #define E_ConvertTo24Name "convertTo24"
-
- /*
- * Convert from 24 bit E_PIXELMAP bitmap to any bitmap
- */
- #define E_ConvertFrom24Name "convertFrom24"
-
- /*
- * Convert from any bitmap to any other bitmap. May take quiet a while,
- * if the needed conversion is not directly implemented.
- */
- #define E_ConvertBitMapName "convertBitMap"
-
- /*
- * Fill a rectangle with solid color
- */
- #define E_RectFillName "rectFill"
-
- /*
- * Fill a rectangle with a mono- or bichromatic pattern
- */
- #define E_RectFillPattName "rectFillPatt"
-
- /*
- * Fill a rectangle with a multicolor pattern
- */
- #define E_RectFillMPattName "rectFillMPatt"
-
- /*
- * Fill a rectangle through a mask with a solid color
- */
- #define E_FillMaskName "fillMask"
-
- /*
- * Fill a rectangle through a mask with a solid color, and also fill
- * the background of the mask
- */
- #define E_FillMaskBackName "fillMaskBack"
-
- /*
- * Fill a rectangle through a mask with a mono- or bichromatic pattern
- */
- #define E_FillMaskPattName "fillMaskPatt"
-
- /*
- * Fill a rectangle through a mask with a multicolor pattern
- */
- #define E_FillMaskMPattName "fillMaskMPatt"
-
- /*
- * Unpack a packed bitplane image
- */
- #define E_UnpackName "unpack"
-
- /*
- * Extract a single color out of a bitmap. All matching pixels will be
- * toggled in the destination mask bitmap.
- */
- #define E_ExtractColorName "extractColor"
-
- /*
- * Clear a bitmap with color 0 (in normal cases black)
- */
- #define E_ClearName "clear"
-
- /*
- * Zoom a bitmap with an integer factor x, if x is
- *
- * <0 : Shrink the image by 1-x
- * =0 : Copy the image
- * >0 : Expand the image by 1+x
- */
- #define E_ZoomBitMapName "zoomBitMap"
- #define E_ZoomFrom24Name "zoomFrom24"
-
- /*
- * Expand a mask bitmap in a zoomed way
- */
- #define E_ZoomMaskMapName "zoomMaskMap"
-
- /*
- * Allocate a bitmap, should be used by driver implementors only. For
- * normal purposes better use E_AllocBitMap or E_AllocBitMapClass.
- */
- #define E_AllocBitMapName "allocBitMap"
- #define E_DisposeBitMapName "disposeBitMap"
-
- /*
- * Get access to a line in segmented memory bitmaps. This call is
- * only valid if enclosed in E_ObtainMap and E_ReleaseMap.
- */
- #define E_SelectLineName "selectLine"
-
- /*
- * Obtain a bitmap for exclusive access. This is required for several
- * bitmap types. Reasons may be an synchonous blitter or segemented
- * memory, or the need to swap bitmaps in and out. Each call of
- * E_ObtainMap must be matched by a call of E_ReleaseMap.
- */
- #define E_ObtainMapName "obtainMap"
- #define E_ReleaseMapName "releaseMap"
-
- /*
- * Blit between two EGS bitmaps
- */
- #define E_BitBltName "bitBlt"
-
- /*
- * Blit from planes to an EGS bitmap
- */
- #define E_BitBltFromPlanesName "bitBltFromPlanes"
-
- /*
- * Blit from an EGS bitmap to planes
- */
- #define E_BitBltToPlanesName "bitBltToPlanes"
-
- /*
- * Select a bitmap to work in E_SELECT.. bitmaps. This call is only valid
- * between E_ObtainMap and E_ReleaseMap calls. The pointer to the requested plane
- * can be found in the "Plane" field.
- */
- #define E_SelectPlaneName "selectPlane"
-
- /*
- * Swap a rectangular area between two bitmaps.
- */
- #define E_SwapBitMapName "swapBitMap"
-
- /*
- * The name of the rootclass of all bitmap classes. All blit functions
- * are broken down to simpler functions (E_Read/E_WritePixel in worst
- * case), so that bitmapclass implementors can focus on the really
- * needed functions.
- */
- #define E_EBitMapClassName "BitMap.class"
-
- /************************ EGS - Pointer *****************/
-
- /*
- * SoftMousePtr, SoftMouse, HardMousePtr, HardMouse
- *
- * Data block for the mouse pointer. Three colors can be used. The bits of
- * a pixel are consecutive as usually, the combination %00 represents a
- * transparent pixel.
- *
- * The maximum size of a software mouse pointer is 32 by 32 pixels. A hard-
- * ware mouse pointer can have up to 64 by 64 pixels but that would exceed
- * the processor capabilities during emulation.
- *
- *
- * EMouse, EMousePtr
- *
- * Definition structure for a mouse pointer. Each screen can have only one
- * mouse pointer at any moment. When switching screens, the pointer is
- * changed adequately. A screen's mouse pointer can be altered by a function
- * at any time.
- *
- * For graphic boards without a hardware pointer a pointer is emulated by
- * software. Specified HardMouse structures are used only if a hardware
- * pointer was implemented, too. If .soft = NULL then the HardMouse structure
- * is converted into a SoftMouse structure automatically.
- *
- * .Color1 : Colour for %01
- * .Color2 : Colour for %10
- * .Color3 : Colour for %11.
- * These colors are supported only for 4 bit mode and higher.
- * .XSpot,
- * .YSpot : Displacement of the mouse pointer's click pixel.
- * .Width,
- * .Height : Width and Height of the SoftMouse.
- * .Soft : Pointer to SoftMouse structure, should always be initia-
- * lized for reasons of compatibility.
- * .Hard : Pointer to HardMouse structure; if you always want to use
- * the 'soft' mouse pointer this field should be NIL.
- *
- * Example: The standard mouse pointer.
- *
- * StdMouse= EMouse:(Color1=$00000001,Color2=$FF0000FF,Color3=$80000080,
- * XSpot=1,YSpot=1,Width=25,Height=31,
- * Soft=SoftMouse:(
- * (%01010101000000000000000000000000,%00000000000000000000000000000000),
- * (%01111111010101010000000000000000,%00000000000000000000000000000000),
- * (%01111010111111110101010100000000,%00000000000000000000000000000000),
- * (%01111111101010101111111101010101,%00000000000000000000000000000000),
- * (%00011111111110101010101011110100,%00000000000000000000000000000000),
- * (%00011111111111111110101011010000,%00000000000000000000000000000000),
- * (%00011111111111111111111101000000,%00000000000000000000000000000000),
- * (%00011111111111111111110100000000,%00000000000000000000000000000000),
- * (%00010111111111111111101101000000,%00000000000000000000000000000000),
- * (%00000111111111111111111011010100,%00000000000000000000000000000000),
- * (%00000111111111111111111110111101,%00000000000000000000000000000000),
- * (%00000111111111011111111111101111,%01000000000000000000000000000000),
- * (%00000101111101010111111111111011,%11010100000000000000000000000000),
- * (%00000001110101010101111111111110,%10111101000000000000000000000000),
- * (%00000001010101010101111111111111,%11101011010000000000000000000000),
- * (%00000001010101010101011111111111,%11111010110101000000000000000000),
- * (%00000001010101010101010111111111,%11111111101111010000000000000000),
- * (%00000001010101010101010101111111,%11111111111101000000000000000000),
- * (%00000001010101010101010101111111,%11111111010100000000000000000000),
- * (%00000000010101010001010101011111,%11111101000000000000000000000000),
- * (%00000000010101000000010101010111,%11110101010000000000000000000000),
- * (%00000000010100000000010101010101,%11110101010100000000000000000000),
- * (%00000000010000000000000101010101,%11010101010101010000000000000000),
- * (%00000000000000000000000001010101,%01010101010101010100000000000000),
- * (%00000000000000000000000000010101,%01010101010101010000000000000000),
- * (%00000000000000000000000000010101,%01010101010101000000000000000000),
- * (%00000000000000000000000000000101,%01010101010000000000000000000000),
- * (%00000000000000000000000000000001,%01010101000000000000000000000000),
- * (%00000000000000000000000000000000,%01010101000000000000000000000000),
- * (%00000000000000000000000000000000,%01010100000000000000000000000000),
- * (%00000000000000000000000000000000,%00010000000000000000000000000000),
- * (%00000000000000000000000000000000,%00000000000000000000000000000000))'PTR);
- */
-
- typedef struct E_ClipRect *E_ClipRectPtr;
-
- struct E_ClipRect {
-
- E_ClipRectPtr Next;
- WORD Left,
- Top,
- Right,
- Bottom;
- };
-
-
- struct E_EMouseImg {
- BYTE width,height;
- BYTE xSpot,ySpot;
- };
-
- typedef struct E_EMouseImg *E_EMouseImgPtr;
-
- struct E_EMouseImg16 {
- struct E_EMouseImg specs;
- ULONG image[16];
- };
-
- typedef struct E_EMouseImg16 *E_EMouseImg16Ptr;
-
- struct E_EMouseImg32 {
- struct E_EMouseImg specs;
- ULONG image[32][2];
- };
-
- typedef struct E_EMouseImg32 *E_EMouseImg32Ptr;
-
- struct E_EMouseImg64 {
- struct E_EMouseImg specs;
- ULONG image[64][4];
- };
-
- typedef struct E_EMouseImg64 *E_EMouseImg64Ptr;
-
- /* EMouseFlags */
-
- #define EMSF_DOUBLE16 1
- #define EMSF_DOUBLE32 2
- #define EMSF_HALF32 4
- #define EMSF_HALF64 8
-
- /* EMouseVersion */
-
- #define EMSV_00 0x00000000
- #define EMSV_01 0x10000000 /* shall be used */
-
- typedef struct E_EMouse *E_EMousePtr;
-
- struct E_EMouse {
-
- LONG Color1, Color2, Color3;
- ULONG Flags;
- ULONG Version;
- E_EMouseImg16Ptr image16;
- E_EMouseImg32Ptr image32;
- E_EMouseImg64Ptr image64;
- };
-
-
- /*********************** EGS - Displaydatabase *****************/
- /*
- * These defines are for the EGS displaydatabase. This database contains the
- * sync and timing parameters for all graphic boards that support generic
- * timings.
- *
- * The main structure is the monitor. A monitor structure contains all
- * displaymodes that can be displayed on this monitor. Every screenmode
- * (here named as E_ScreenSpec) describes one resolution, and is composed
- * of one or more possible timing schemes (here called E_ScreenParam).
- *
- * These structures may olny be created and modified by library calls, as
- * they are cloned and distributed between several drivers.
- *
- * The information of this database is stored in "egs:monitors/specs". At
- * library initialisiation time, this information is retrieved.
- *
- * You should not change any of these structures, except for programs that
- * are intended to edit display parameters like the "EGS-DisplayAdjust".
- *
- */
-
- #define E_COMPOSITE 0x00000001 /* The monitor requires a composite
- * sync signal. If missing, a separate
- * syncing signal will be generated.
- */
- #define E_SYNC_ON_GREEN 0x00000002 /* The composite sync signal should
- * be mixed with the green color
- * signal. This flag is only valid
- * if E_COMPOSITE is also set.
- */
- #define E_TESSELATED 0x00000004 /* A tesselated flyback pattern is to
- * be generated during vertical
- * flyback.
- */
- #define E_BLANK 0x00000008 /* The blanking pedestal is not black
- * but even darker.
- */
- /*
- * This structure describes one monitor type. Several monitor types maybe
- * mixed up for a single displaydriver.
- */
-
- struct E_MonitorSpec {
-
- struct Node Node; /* internal chaining, the list is found in
- * the hard info "monitors", the lh_name
- * field contains the monitor name
- */
- WORD Pad0;
- struct List Screens; /* list of the supported screenmodes; the
- * nodes are of type "E_ScreenSpec"
- */
- WORD Pad1;
- ULONG Sync; /* Syncing flags */
-
- WORD MinHoriz; /* minimum horizontal frequency * 1/100KHz */
- WORD MaxHoriz; /* maximum horizontal frequency * 1/100KHz */
- WORD MinVerti; /* minimum vertical frequency  * 1/100Hz */
- WORD MaxVerti; /* maximum vertical frequency * 1/100Hz */
- };
-
- typedef struct E_MonitorSpec *E_MonitorSpecPtr;
-
- #define E_MST_SYNC TAG_USER + 0
- #define E_MST_MIN_HORIZ TAG_USER + 1
- #define E_MST_MAX_HORIZ TAG_USER + 2
- #define E_MST_MIN_VERTI TAG_USER + 3
- #define E_MST_MAX_VERTI TAG_USER + 4
-
- /*
- * Structure describing a single screen resolution.
- */
-
- struct E_ScreenSpec {
-
- struct Node Node; /* internal chaining, the list is found
- * in the associated E_MonitorSpec
- * structure, the lh_name field contains
- * the basic name of the screenmode
- */
- WORD Pad0;
- WORD Width; /* horizontal resolution in pixels */
- WORD Height; /* vertical resolution in pixels */
- struct MinList Params; /* a list of possible sync timings,
- * consisting of "E_ScreenParam"
- */
- E_MonitorSpecPtr Monitor; /* the associated monitor */
- };
-
- typedef struct E_ScreenSpec *E_ScreenSpecPtr;
-
- #define E_SSPT_NAME TAG_USER + 0
- #define E_SSPT_WIDTH TAG_USER + 1
- #define E_SSPT_HEIGHT TAG_USER + 2
-
- /*
- * Some notes about display and syncing...
- *
- *
- *
- * +------------------------------------------------+
- * |################################### HH |\
- * |################################### HH | |
- * |################################### HH | |
- * |################################### HH | |
- * |################################### HH | |
- * |################################### HH | \ active vertical
- * |################################### HH | /
- * |################################### HH | |
- * |################################### HH | |
- * |################################### HH | |
- * |################################### HH | |
- * |################################### HH | |
- * |################################### HH | |
- * |################################### HH |/
- * | HH |\_ vertical \
- * | HH | | front |
- * | HH |/ porch |
- * |VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV|\_ vertical | vertical
- * |VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV|/ sync \ blank
- * | HH |\ /
- * | HH | | |
- * | HH | | vertical |
- * | HH | \ back |
- * | HH | / porch |
- * | HH | | |
- * | HH |/ /
- * +------------------------------------------------+
- * \____________ ___________________/\ _/\/\_ _/
- * \/ \/ | \/
- * active horizontal | | horizontal back porch
- * | |
- * | \ horizontal sync
- * |
- * \ horizontal front porch
- *
- * \_ ________/
- * \/
- * horizontal blank
- *
- * Pixel timing diagramm:
- *
- * . . . . . . . . . . . . . .
- * ._ ._ ._ ._ ._ ._ ._ ._ ._ ._ ._ ._ ._ ._
- * PClock : | | | | | | | | | | | | | | | | | | | | | | | | | | |
- * _|.|_|.|_|.|_|.|_|.|_|.|_|.|_|.|_|.|_|.|_|.|_|.|_|.|_|.
- * . . . . . . . .__________ . . .
- * RGB : . . . . . . .___/ . . \ . . .
- * . . . . . .___/ . . . | . ._____
- * . . .___. . / . . . . | . / .
- * . .___/ \ . | . . . . | . | .
- * black ...../........\_____/.....................\_____/......
- * . | . . . . . . . . . . . .
- * blank ____/. . . . . . . . . . . . .
- * . ._________________________________________________
- * DispEn : . | . . . . . . . . . . . .
- * _____|.................................................
- * . . . . . . . . . . . . . .
- *
- * PClock or pixel frequency determines the speed at which pixels are sampled
- * and sent to the DACs.
- *
- *
- *
- *
- * Horizontal timinig diagram:
- *
- * . . . . .
- * RGB : ############## ##############. . . ######
- * _____##############...##############_____________######
- * .______________________________. . . ._____
- * DispEn: | | . . |
- * _____|..............................|____________|.....
- * . . ._. .
- * HSync : . . | | .
- * _________________________________________|.|___________
- * . . . . .
- * Sync on : ############## ##############. . . ######
- * green _____##############...##############_____..._____######
- * . . |_| .
- * . . . . .
- *
- * | - active video ------------- | hf | | hb |
- * | | hs |
- * | | |
- * | | - hblank - |
- * | |
- * | - linetime ------------------------------ |
- *
- * hf : Horizontal front porch, the time between the end of the
- * active display to the start of the horizontal sync pulse.
- * This value controls the size of the right border of a display.
- *
- * hs : Horizontal sync, this signal starts the horizontal flyback.
- *
- * hb : Horizontal back porch, the time between the and of the
- * horizontal sync pulse to the start of the next display line.
- * This value contorls the size of the left border of a display.
- *
- * hblank : The full blanking period, from the end of line n to the start
- * of line n+1. This value controlls the width of the display.
- * If hf and hb are changed, but hblank kept the same, the display
- * can be moved to the left or right.
- *
- * hfreq : The horizontal line frequency equals 1/linetime
- *
- * Vertical timing diagramm:
- *
- * . . . . . . . . .
- * RGB : ####. ####. ####. . . . . . . #
- * ####._####__####______________________________________#
- * ___ . ___ . ___ . ___ . . . . . . _
- * DispEn : |.| |.| |.| |. . . . . .|
- * ...|_|...|_|...|_|...|_______________________________|.
- * . . . . . . . . .
- * HSync : | | | | | | | | | | | |
- * ____|_____|_____|_____|__|__|__|__|__|__|_____|_____|__
- * . . . . ._____. . . .
- * VSync : . . . . | | . . .
- * ____________________________|.....|____________________
- * . . . . ._____. . . .
- * CSync : | | | | | | . . |
- * ____|_____|_____|_____|_____|.....|_________________|__
- * . . . . .__ __. . . .
- * CSync : | | | | | | | | | | | |
- * tesselated____|_____|_____|_____|__|__|..|..|__|__|_____|_____|__
- * . . . . . . . . .
- * CSync on: ####. ####. ####. . . . . . . #
- * green ####._####._####._____.__ __.......__ __._____._____._#
- * | | | | | |__|__| | | | |
- * . . . . . . . . .
- *
- * | |vpre | |vpost| |
- * | |
- * | --- vf --- | vs | ----- vb -------- |
- * | |
- * <-- active --- | - vertical blanking period vblank - |->
- * |
- * <------------- | - frametime -------------------------->
- *
- * vf : Vertical front porch, the time from the end of the last
- * active line to the start of the sync signal, controls the
- * the size of the bottom border of the display
- *
- * vs : Vertical sync pulse, start the vertical flyback
- *
- * vb : Vertical back porch, the time from the end of the vertical
- * sync to the start of the next display frame. This value
- * controls the size of the top border
- *
- * vpre,
- * vpost : Vertical ??serration?? pulses, needed in interlace mode to
- * sync on a half line
- *
- * vblank : The full vertical blanking period this value controls
- * the vertical size of the display
- *
- * vfreq : The vertical frame frequency equals 1/frametime
- *
- *
- */
-
- #define E_LACED 0x00000001 /* The screen will be interlaced */
- #define E_DOUBLED 0x00000002 /* The screen will be doublescanned */
-
- struct E_ScreenParam {
-
- struct MinNode MinNode; /* internal chaining, the list is found
- * in the associated screen param struct.
- */
- WORD PixFreq; /* pixel frequency in units of 1/100 MHz */
- WORD LineFreq; /* line frequency in units of 1/100 KHz */
- WORD FrameFreq; /* frame frequency in units of 1/100 Hz */
- WORD Pad0;
-
- ULONG Flags; /* ScreenParamFlagSet */
-
- WORD Hfront; /* horizontal front porch in ns */
- WORD Hsync; /* horizontal sync in ns */
- WORD Hback; /* horizontal back porch in ns */
-
- WORD Vfront; /* vertical front porch in µs */
- WORD Vsync; /* vertical sync in µs */
- WORD Vback; /* vertical back porch in µs */
- WORD Vpre; /* vertical preequalisation in µs */
- WORD Vpost; /* vertical postequalisation in µs */
-
- E_ScreenSpecPtr Screen; /* the ruling screen param */
- };
-
- typedef struct E_ScreenParam *E_ScreenParamPtr;
-
- #define E_SPT_PIXFREQ TAG_USER + 0
- #define E_SPT_LINEFREQ TAG_USER + 1
- #define E_SPT_FRAMEFREQ TAG_USER + 2
- #define E_SPT_FLAGS TAG_USER + 3
- #define E_SPT_HFRONT TAG_USER + 4
- #define E_SPT_HSYNC TAG_USER + 5
- #define E_SPT_HBACK TAG_USER + 6
- #define E_SPT_VFRONT TAG_USER + 7
- #define E_SPT_VSYNC TAG_USER + 8
- #define E_SPT_VBACK TAG_USER + 9
- #define E_SPT_VPRE TAG_USER + 10
- #define E_SPT_VPOST TAG_USER + 11
-
-
-
- /*********************** EGS - Video **************************************/
- /*
- * As EGS supports several graphics boards, digitizer and other familiar hardware
- * at the same time, there has to be a structure that describes the logical
- * routing of video signals.
- *
- * EGS supports a ??bipartite?? graph of E_VideoNodes and E_VideoLinks, that
- * represent the logical video routing.
- *
- * The routing information can be changed and retrieved by EGS message
- * dispatching, or direct library calls.
- *
- *
- *
- *
- */
-
- /* VideoNodeFlags */
-
- #define E_CONTINUOS 0x00000001 /* The device does continues work */
- #define E_ACTIVE 0x00000002 /* The device only works on request */
-
- /*
- * Basic structure of all video nodes.
- */
-
- struct E_VideoNode {
-
- /* E_EGSObject Object; */ /* is an EGS object */
- struct Node Node; /* linking of public video nodes */
- WORD Pad0;
- ULONG Flags; /* VideoNodeFlags */
- APTR DriverData; /* driver specific private data */
- };
-
- typedef struct E_VideoNode *E_VideoNodePtr;
-
- /*
- * An videolink links to video nodes together.
- */
-
- struct E_VideoLink {
-
- struct MinNode Node; /* private linking */
- E_VideoNodePtr From; /* the signal source */
- E_VideoNodePtr To; /* the signal drain */
- APTR FromData; /* private source data */
- APTR ToData; /* private drain data */
- };
-
- typedef struct E_VideoLink *E_VideoLinkPtr;
-
- /*
- * Basic node of all video emitting devices
- */
-
- struct E_VideoSource {
-
- struct E_VideoNode VideoNode; /* Supertypedata */
- E_VideoLinkPtr Out; /* output link */
- };
-
- typedef struct E_VideoSource *VideoSourcePtr;
-
- /*
- * Basic node of all video receiving devices
- */
-
- struct E_VideoDrain {
-
- struct E_VideoNode VideoNode; /* Supertypedata */
- E_VideoLinkPtr In; /* input link */
- };
-
- typedef struct E_VideoDrain *E_VideoDrainPtr;
-
- /*
- * Video multiplexer node, several inputs, one output. One of the input
- * signals is routed to the output. This type can be used for multiscreen
- * display drivers or switchboxes.
- */
-
- struct E_VideoMux {
-
- struct E_VideoSource VideioSource; /* Supertypedata */
- struct List In; /* list of incoming links,
- * consists of E_VideoMuxChannel
- */
- WORD Pad0;
- E_VideoLinkPtr CurrentIn; /* the current input signal */
- };
-
- typedef struct E_VideoMux *E_VideoMuxPtr;
-
- struct E_VideoMuxChannel {
-
- struct Node Node; /* internal chaining */
- WORD Pad0;
- E_VideoLinkPtr Link; /* the represented link */
- };
-
- typedef struct E_VideoMuxChannel *E_VideoMuxChannelPtr;
-
- /*
- * A video multiplier, spreads one signal over several drains.
- */
-
- struct E_VideoMulti {
-
- struct E_VideoDrain VideoDrain; /* Supertypedata */
- struct List Out; /* list of outputs */
- WORD Pad0;
- };
-
-
- typedef struct E_VideoMulti *E_VideoMultiPtr;
-
- /*
- * Message for linking purposes between video nodes.
- */
-
- struct E_LinkMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Messageheader */
- E_VideoLinkPtr Link; /* link to be linked or removed */
- E_VideoNodePtr From; /* node that serves as source */
- E_VideoNodePtr To; /* node that seves as drain */
- };
-
- typedef struct E_LinkMsg *E_LinkMsgPtr;
-
- /*
- * Message for activation purposes
- */
-
- struct E_ActivateMsg {
-
- struct E_EGSObjMsg ObjMsg;
- };
-
- typedef struct E_ActivateMsg *E_ActivateMsgPtr;
-
- /*
- * Message to establish a connections between a video source
- * to a video drain.
- */
-
- struct E_RouteMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Messageheader */
- E_VideoLinkPtr Link; /* inputlink, to be routed to the
- * nodes output
- */
- };
-
- typedef struct E_RouteMsg *E_RouteMsgPtr;
-
- /*
- * Message to retrieve informations of the current video routing.
- */
-
- struct E_GetRouteMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Messageheader */
- E_VideoNodePtr Start; /* starting node */
- E_VideoNodePtr End; /* ending node */
- E_VideoLinkPtr Link; /* currently used link */
- UBYTE Ok; /* boolean result */
- UBYTE Pad0;
- WORD Pad1;
-
- };
-
- typedef struct E_GetRouteMsg *E_GetRouteMsgPtr;
-
- /*
- * Activate a given video node, and try to display it. This is used for
- * screen to front or the like.
- */
- #define E_ActivateName "activate"
-
- /*
- * Deactivate a given video node, and try to hide it from the display;
- */
- #define E_DeactivateName "deactivate"
-
- /*
- * Add a source link to a video node
- */
- #define E_AddFromLinkName "addFromLink"
-
- /*
- * Remove a source link from a video node
- */
- #define E_RemFromLinkName "remFromLink"
-
- /*
- * Add a drain link to a video node
- */
- #define E_AddToLinkName "addToLink"
-
- /*
- * Remove a drain link from a video node
- */
- #define E_RemToLinkName "remToLink"
-
- /*
- * Route a video input to the nodes output and propagate to the next node.
- */
- #define E_RouteName "route"
-
- /*
- * Find a current video drain to a given video node
- */
- #define E_FindDrainName "findDrain"
-
- /*
- * Find a current video source to a given video node
- */
- #define E_FindSourceName "findSource"
-
- /*
- * Check, if a given video node is a drain of an other one
- */
- #define E_CheckDrainName "checkDrain"
-
- /*
- * Check, if a given video node is a source of another node
- */
- #define E_CheckSourceName "checkSource"
-
- /*
- * Test if a video node can be routed to be the drain of an other node
- */
- #define E_AvailDrainName "availDrain"
-
- /*
- * Test if a video node can be routed to be the source of an other node
- */
- #define E_AvailSourceName "availSource"
-
- /*
- * Classnames for basic video node classes
- */
- #define E_VideoNodeClassName "VideoNode.class"
- #define E_VideoSourceClassName "VideoSource.class"
- #define E_VideoDrainClassName "VideoDrain.class"
- #define E_VideoMuxClassName "VideoMux.class"
- #define E_VideoMultiClassName "VideoMulti.class"
-
- /*********************** EGS - Screen ************************************/
- /*
- * E_EScreens are a combination of a bitmap, a video node and an input system.
- * They emulate a virtual graphic terminal, and serve as the base of most
- * EGS work.
- *
- * An E_EScreen is still a low level element, so it would be wis, to use the
- * windows and other GUI elements, supported by EGSintui...
- *
- * E_EScreens may be useful for video applications, games and emulations.
- *
- * Every E_EScreen is accompanied by an E_Map2Video video node. This node is
- * created by a displaydriver.
- *
- *
- */
-
- /*
- * This is the class container of map2video video node objects. It is
- * extended with some shortcuts, to speed up mouse and color activities.
- *
- * Every map2video class must inherit this class.
- *
- */
-
- struct E_Map2VideoClass {
-
- struct E_EGSClass Class; /* superclassdata */
- struct E_EGSMethod /* dispatcher shortcuts */
- MouseOn,
- MouseOff,
- SetMouse,
- HideMouse,
- DefineMouse,
- SetRGB8,
- WaitTOF,
- FlipMap;
- };
-
- typedef struct E_Map2VideoClass *E_Map2VideoClassPtr;
-
- /*
- * The map2video node base object. It may be extended by custom display
- * drivers by the use of subclassing. All display specific information
- * of the screen is stored here (esp. in the ViewData field).
- */
-
- struct E_Map2Video {
-
- struct E_VideoSource VideoSource; /* superclassdata */
- E_EScreenPtr Scr; /* the associated E_EScreen */
- APTR ViewData; /* driver private display
- * data
- */
- E_Map2VideoClassPtr Class; /* easy access to the class */
- };
-
- typedef struct E_Map2Video *E_Map2VideoPtr;
-
- /*
- * Messages for mouse related operations.
- */
-
- struct E_MouseMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- WORD X,Y; /* Mouse location */
- E_EMousePtr Mouse; /* Mouseimage and colors */
- };
-
- typedef struct E_MouseMsg *E_MouseMsgPtr;
-
- /*
- * Messages for color operations.
- */
-
- struct E_SetRGB8Msg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- WORD From; /* first color that has been
- * changed
- */
- WORD Num; /* number of colors that have
- * been changed
- */
- };
-
- typedef struct E_SetRGB8Msg *E_SetRGB8MsgPtr;
-
- /*
- * Message for E_WaitTOF
- */
-
- struct E_WaitTOFMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- };
-
- typedef struct E_WaitTOFMsg *E_WaitTOFMsgPtr;
-
- /*
- * Message for bitmap flipping
- */
-
- struct E_FlipMapMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EBitMapPtr NewMap; /* the new map to be
- * displayed
- */
- E_EBitMapPtr OldMap; /* resulting the old map that
- * was previously
- * displayed
- */
- };
-
- typedef struct E_FlipMapMsg *E_FlipMapMsgPtr;
-
- /*
- * Message sent for recalculation of a displaymode, to reflect changes.
- */
-
- struct E_RecalcViewMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_ScreenParamPtr mode; /* The mode that has been
- * changed
- */
- };
-
- typedef struct E_RecalcViewMsg *RecalcViewMsgPtr;
-
- /*
- * Please note that an EScreen is different from the EGSIntui screens, i.e.
- * NO window can be opened on any EScreen; for that purpose an EGSIntui screen
- * must be created.
- */
-
- /* Corresponding EScrFlagSet has 32 bits ! */
-
- #define E_SCREENBEHIND 0x00000001 /* The screen shall be opened behind
- * all others
- */
- #define E_OWN_BITMAP 0x00000002 /* The screen is using a custom
- * bitmap. (DISABLED at this time)
- */
- #define E_LACESCREEN 0x00000004
- #define E_SF3 0x00000008
- #define E_SF4 0x00000010
- #define E_SF5 0x00000020
- #define E_HARDMOUSE 0x00000040 /* The screen has a hardware mouse
- * cursor. You may check this to
- * avoid (E_MouseOn/Off) calls
- */
- #define E_OWN_INPUTSERVER 0x00000080 /* The displaydriver implements an
- * own inputserver for this screen
- */
- #define E_FAKE_INTUISERVER 0x00000100 /* This is no real screen, it is
- * only a hack to represent an
- * intuition screen
- */
- #define E_DITHER_COLORS 0x00000200 /* The palette will be initialized
- * for automatic dithering
- */
- #define E_MOUSEOFF 0x00000400 /* The mouse is currently switched
- * off
- */
- #define E_DEFAULT_SCREEN 0x00000800 /* This is the EGSIntui default
- * screen
- */
- #define E_SF12 0x00001000
- #define E_HIDEMOUSE 0x00002000 /* Do not show the mouse on this
- * screen
- */
- #define E_MONOCHROME 0x00004000 /* The screen shall open monochrome
- * (greyscale) if possible
- */
-
- /*
- * Requesting structure for E_OpenScreen
- */
-
- struct E_NewEScreen {
- char *Mode; /* Name of the requested display
- * mode. The available mode names
- * can be retrieved by use of the
- * hardinfo structure.
- */
- UWORD Depth; /* requested depth */
- UWORD Pad_1;
- E_CLUPtr Colors; /* initializing colorpalette or
- * NULL for standard palette
- */
- E_EBitMapPtr Map; /* Custom map (DISABLED use NULL) */
- ULONG Flags; /* requesting flags for the new
- * screen; available at this point
- * are E_SCREENBEHIND and
- * E_DITHERCOLORS
- */
- E_EMousePtr Mouse; /* an initial mousepointer for the
- * screen
- */
- ULONG EdcmpFlags; /* initial edcmpflags for the new
- * screen
- */
- struct MsgPort *Port; /* a custom port, has to be removed
- * before the screen is closed
- */
- };
-
- typedef struct E_NewEScreen *E_NewEScreenPtr;
-
- /* EScreenTags */
-
- #define EST_MODE 0x80100000
- #define EST_DEPTH EST_MODE+1
- #define EST_COLORS EST_MODE+2
- #define EST_MAP EST_MODE+3
- #define EST_FLAGS EST_MODE+4
- #define EST_MOUSE EST_MODE+5
- #define EST_EDCMPFLAGS EST_MODE+6
- #define EST_PORT EST_MODE+7
-
- #define EST_WIDTH EST_MODE+8 /* requested width for the screens
- * bitmap; If the driver can not
- * fullfill your wish, you will
- * get the maximum that is
- * possible
- */
- #define EST_HEIGHT EST_MODE+9 /* requested height, same restrictions
- * as EST_WIDTH
- */
- /*
- * EScreen
- * .Prev,
- * .Next : Internal chaining.
- * .View : !!!! PRIVATE !!!!
- * .Map : Pointer to the screen's BitMap structure.
- * .Colors : !!!! PRIVATE !!!!
- * .Mouse : EMouse structure (READ ONLY !!!!).
- * .MouseOn : !!!! PRIVATE !!!!
- * .EdcmpFlags : Message flags (READ ONLY !!!).
- * .Port : Screen's message port.
- * .BackLink : Link field for users, e.g. used by EGSIntui.
- * .MouseX,
- * .MouseY : Always the current mouse position on the screen.
- */
-
-
- struct E_EScreen {
-
- struct MinNode Node; /* internal chaining */
- E_Map2VideoPtr View; /* the screens view */
- E_EBitMapPtr Map; /* the screens bitmap */
- E_CLUPtr Colors; /* the screens colormap */
- E_EMousePtr Mouse; /* the screens mouse image */
- ULONG Flags; /* the screens flags */
- UBYTE MouseOn;
- UBYTE Pad_1;
- UBYTE Pad_2;
- UBYTE Pad_3;
- ULONG E_edcmpFlags; /* current edcmpflags */
- struct MsgPort *Port; /* current message port */
- APTR BackLink; /* user specific */
- WORD MouseX, MouseY; /* current mouse location */
- APTR EIScreen;
- struct E_ClipRect Off;
- char *ModeName;
- struct E_EMouseImg MouseImg;
- };
-
- /*
- * List that contains all monitor specs that are supported by a monitor
- * that is linked to a display driver
- */
-
- struct E_MonitorUse {
-
- struct MinNode Node;
- E_MonitorSpecPtr Monitor;
- };
-
- typedef struct E_MonitorUse *E_MonitorUsePtr;
-
-
- #define E_SUPPORTS_GENERICSYNCS 0x00000001 /* the driver supports generic
- * sync timing
- */
- #define E_SUPPORTS_INTERLACE 0x00000002 /* the driver supports inter-
- * laced graphic modes
- */
- #define E_SUPPORTS_DOUBLESCAN 0x00000004 /* the driver supports double
- * scanned graphic modes
- */
-
- struct E_MinMax {
-
- WORD min;
- WORD max;
- };
-
- /*
- * Basic object structure of a display driver. A display driver offers
- * the system one or more screenmodes. It is able to create a map2video
- * video node that then controlls the open screen.
- */
-
- struct E_DisplayDriver {
-
- /* E_EGSObject Object; */
- /* it's an object !!! */
- struct Node Node; /* internal chaining, the list
- * is found in the hardinfo
- * structure
- */
- WORD Pad0;
-
- char *Prefix; /* the prefix name of all the
- * drivers screenmodes like
- * "LEGSa:" or "RB3a:"
- */
- ULONG Depths; /* supported colordepths, each
- * bit represents one depth, so
- * 1<<8 stands for eight biz
- */
- struct E_MinMax Freqs[24]; /* supported pixel frequency
- * intervalls for specific color
- * depths. (as C does not support
- * array starting at one, the
- * index is colordepth minus one)
- */
- struct MinList Monitors; /* supported specs of the attached
- * monitor
- */
- ULONG Flags; /* DisplayDriverFlagSet; */
- char *Default; /* the name of the drivers defaults
- * file
- */
- ULONG MaxPixel[24]; /* The maxmimum number of pixels
- * the graphics device can
- * in a given color depth. (As C
- * does not support arrays
- * starting at one, the index is
- * colordepth minus one)
- */
- ULONG MemSize; /* The size of the onboard memory in
- * bytes
- */
- UWORD MouseSize; /* The maximum mouse size, may be
- * less for some screenmodes
- */
- UWORD Pad1;
- char *description; /* A small text describing the
- * graphics device
- */
- };
-
- typedef struct E_DisplayDriver *E_DisplayDriverPtr;
-
- /*
- * Message for creation of a displaydriver
- */
-
- struct E_CreateDisplayDriverMsg {
-
- struct E_CreateMsg CreateMsg; /* Message heaer */
- char *Name; /* the driver name */
- char *Prefix; /* the used prefix */
- };
-
- typedef struct E_CreateDisplayDriverMsg *E_CreateDisplayDriverMsgPtr;
-
-
- /*
- * Information on supported screen modes and depths. The list including
- * these modes is found by 'GetHardInfo'.
- *
- */
-
-
- struct E_ScreenMode {
-
- struct Node Node; /* internal chaining, the lh_Name
- * field contains the modes name
- */
- UWORD Pad;
- UWORD Horiz; /* horizontal resolution */
- UWORD Vert; /* vertical resolution */
- ULONG Depths; /* supported depths */
- E_DisplayDriverPtr Driver; /* offering driver */
- E_ScreenParamPtr Specs[24]; /* used spec 0 for 1 bit... */
- };
-
- typedef struct E_ScreenMode *E_ScreenModePtr;
-
-
- /*
- * Message for calculation of the real timings that will be generated
- * by a display hardware for a requested mode
- */
-
- struct E_GetRealTimingsMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_ScreenParamPtr Param; /* the requested timings */
- E_ScreenParamPtr Real; /* the resulting timings */
- };
-
-
- typedef struct E_GetRealTimingsMsg *E_GetRealTimingsMsgPtr;
-
- /*
- * Message sent to a display driver to create a map2video node for a new
- * E_EScreen. The driver is also responsible to create and including a
- * matching bitmap.
- */
-
- /*
- typedef struct TagItem **E_ScreenTagListPtr;
- */
- typedef APTR E_EScreenTagListPtr;
-
- struct E_OpenMap2VideoMsg {
-
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_NewEScreenPtr Newe; /* the E_NewEScreen structure */
- E_EScreenPtr Escr; /* the partially initialized
- * E_EScreen structure
- */
- E_ScreenModePtr ScreenMode; /* the requested screen mode */
- E_Map2VideoPtr M2V; /* the resulting map2video node */
- E_EScreenTagListPtr Tags; /* additional tags */
- };
-
- typedef struct E_OpenMap2VideoMsg *E_OpenMap2VideoMsgPtr;
-
- struct E_Blanker {
- /* E_EGSObject */
- struct MinNode Node;
- E_EScreenPtr Screen;
- };
-
- struct E_CreateBlankerMsg {
- struct E_EGSObjMsg ObjMsg; /* Message header */
- E_EScreenPtr OldScreen; /* The currently displayed
- * screen
- */
- };
-
- /*
- * Set the current input focus to a screen
- */
- #define E_SetUserFocusName "setUserFocus"
-
- /*
- * Turn mouse on/off, if it is a soft mouse
- */
-
- #define E_MouseOnName "mouseOn"
- #define E_MouseOffName "mouseOff"
-
- /*
- * Show and move mouse to a given location
- */
- #define E_SetMouseName "setMouse"
-
- /*
- * Hide the mouse, even if it is a hardware cursor
- */
- #define E_HideMouseName "hideMouse"
-
- /*
- * Change the pointer image
- */
- #define E_DefineMouseName "defineMouse"
-
- /*
- * Perform changes on colormap
- */
- #define E_SetRGB8Name "setRGB8"
-
- /*
- * Defer task, until the end of the frame is reached
- */
- #define E_WaitTOFName "waitTOF"
-
- /*
- * Change a screens bitmap to a new bitmap, for double buffering
- */
- #define E_FlipMapName "flipMap"
-
- /*
- * Perform changes made to a screen spec, to be reflected on displayed
- * screens
- */
- #define E_RecalcViewName "recalcView"
-
- /*
- * Create a map2vide node
- */
- #define E_OpenMap2VideoName "openMap2Video";
-
- /*
- * Calculate the real display timings
- */
- #define E_GetRealTimingsName "getRealTimings"
-
-
- /*
- * Class names
- */
- #define E_DisplayDriverClassName "DisplayDriver.class"
- #define E_Map2VideoClassName "Map2Video.class"
- #define E_BlankerClassname "Blanker.class"
-
-
-
- /*********************** EGS - Digitzer ************************************/
-
- struct E_Video2Map {
-
- struct E_VideoDrain VideoDrain;
- E_EBitMapPtr Map;
- };
-
- #define E_Video2MapClassName "Video2Map.class"
-
- typedef struct E_Video2Map *E_Video2MapPtr;
-
-
- /*********************** EGS - Monitors ************************************/
-
- /* Directions */
-
- #define E_LEFT 0
- #define E_UP 1
- #define E_RIGHT 2
- #define E_DOWN 3
-
- typedef struct E_Monitor *E_MonitorPtr;
-
- struct E_Monitor {
-
- struct E_VideoDrain VideoDrain;
- E_MonitorPtr Border[4];
- };
-
-
- #define E_MonitorClassName "Monitor.class"
-
- /*********************** EGS - Information ************************************/
-
- /*
- * To realize the highest possible compatibility between different graphics
- * boards, the library must offer a function giving information about the
- * board(s) currently plugged in. Among these information items are the
- * resolutions that the board implements.
- * That task is carried out by the HardInfo structure and the procedure
- * "GetHardInfo". As serveral graphics devices are supported at the same time,
- * most of the fields are now void.
- * During accesses to the list you have to call E_LockEGSVideo..E_UnlockEGSVideo
- * to grant exclusive access.
- *
- */
-
-
- typedef struct E_HardInfo *E_HardInfoPtr;
-
- struct E_HardInfo {
- char *Product, *Manufact, *Name; /* VOID */
- WORD Version, MaxFreq; /* VOID */
- ULONG Flags; /* VOID */
- struct List *Modes; /* avail screenmodes */
- WORD ActPixClock, FrameTime; /* VOID */
- APTR MemBase; /* VOID */
- LONG MemSize; /* VOID */
- char *LibDate;
- struct List *Drivers; /* avail displaydrivers */
- struct List *Monitors; /* avail monitorspecs */
- struct List *VideoNodes; /* avail videonodes */
- struct List *Screen; /* currently open screens */
- };
-
- #endif /* EGS_EGS_H */
-